﻿<Window x:Class="Wallace.IDE.SalesForce.UI.EditSalesForceCredentialWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:localUI="clr-namespace:Wallace.IDE.Framework.UI"
        xmlns:sfd="clr-namespace:SalesForceData;assembly=SalesForceData"
        xmlns:system="clr-namespace:System;assembly=mscorlib"
        Title="Edit SalesForce Credential"
        Height="348" 
        Width="590"
        MinHeight="300"
        MinWidth="300"        
        WindowStartupLocation="CenterOwner"
        ResizeMode="CanResizeWithGrip"
        Style="{StaticResource ChromeWindowStyle}"
        Background="{StaticResource CaptionBackgroundBrush}">
    
    <Border Padding="5,5,20,5">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="40" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
        
            <TextBlock Grid.Row="0"
                       Grid.Column="0"
                       Grid.ColumnSpan="2"
                       Margin="5"
                       VerticalAlignment="Center"
                       FontWeight="Bold"
                       Text="Enter SalesForce credential details." />

            <TextBlock Grid.Row="1"
                       Grid.Column="0"
                       Margin="5"
                       TextAlignment="Right"
                       VerticalAlignment="Center"
                       FontWeight="Bold"
                       Text="Domain:" />

            <!-- Domain -->
            <ComboBox x:Name="comboBoxDomain"
                      Grid.Row="1"
                      Grid.Column="1"
                      Margin="5"
                      Padding="2"
                      HorizontalAlignment="Stretch"/>

            <TextBlock Grid.Row="2"
                       Grid.Column="0"
                       Margin="5"
                       TextAlignment="Right"
                       VerticalAlignment="Center"
                       FontWeight="Bold"
                       Text="Username:" />

            <!-- Username -->
            <TextBox x:Name="textBoxUsername"
                     Grid.Row="2"
                     Grid.Column="1"
                     Margin="5" />
            
            <TextBlock Grid.Row="3"
                       Grid.Column="0"
                       Margin="5"
                       TextAlignment="Right"
                       VerticalAlignment="Center"
                       FontWeight="Bold"
                       Text="Password:" />

            <!-- Password -->
            <PasswordBox x:Name="passwordBoxPassword"
                         Grid.Row="3"
                         Grid.Column="1"
                         Margin="5" />

            <TextBlock Grid.Row="4"
                       Grid.Column="0"
                       Margin="5"
                       TextAlignment="Right"
                       VerticalAlignment="Center"
                       FontWeight="Bold"
                       Text="Token:" />

            <!-- Token -->
            <PasswordBox x:Name="passwordBoxToken"
                         Grid.Row="4"
                         Grid.Column="1"
                         Margin="5">
            </PasswordBox>

            <StackPanel Grid.Row="5"
                        Grid.Column="0"
                        Grid.ColumnSpan="2"
                        Orientation="Horizontal"
                        VerticalAlignment="Bottom"
                        HorizontalAlignment="Right">
                <Button Margin="5"
                        Padding="10,5,10,5"
                        Click="buttonSave_Click">
                        Save
                </Button>
                <Button Margin="5"
                        Padding="10,5,10,5"
                        Click="buttonCancel_Click">
                        Cancel
                </Button>
            </StackPanel>
        </Grid>
    </Border>
</Window>
